﻿@namespace Microsoft.AspNetCore.Components
@inherits ComponentBase
@typeparam Model

@if (FormModel is { })
{
    var renderInfo = GetRenderInfo();
    @if (RenderRecursion is { } renderRecursion)
    {
        <CascadingValue Value="renderRecursion">
            @RenderComponent(renderInfo)
        </CascadingValue>
    }
    else
    {
        @RenderComponent(renderInfo)
    }
}